/*
 * FILE							: ad7606.h
 * DESCRIPTION			: This file is the header file of ad7606 driver.
 * Author						: weicguodong
 * Copyright				:
 *
 * History
 * --------------
 * Rev						  : 0.00
 * Date						  : 2017-05-03
 *
 * create.
 * --------------
 */
/*--------------------------------------------------------*/
#ifndef __ad7606_h__
#define __ad7606_h__

//-----------------Include files-------------------------//


//-------------------define------------------------------//
#define AD7606_DATA fpga_read(0);

#define CONVA_HIGH	GPIO_SetBits(GPIOD,GPIO_Pin_13)
#define CONVA_LOW	GPIO_ResetBits(GPIOD,GPIO_Pin_13)

#define CONVB_HIGH	GPIO_SetBits(GPIOD,GPIO_Pin_12)
#define CONVB_LOW	GPIO_ResetBits(GPIOD,GPIO_Pin_12)

#define RST_HIGH	GPIO_SetBits(GPIOD,GPIO_Pin_11)
#define RST_LOW	GPIO_ResetBits(GPIOD,GPIO_Pin_11)

#define BUSY GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_3)
 
//----------------- Typedef------------------------------//

typedef struct{
	int (* initialize)(void);
	void (*read_8_channel)(void);
	short int buffer_8_channel[8];
}AD7606_T;

//----------------- Extern ------------------------------//

extern AD7606_T ad7606;

#endif //__ad7606_h__
